<template>
    <ul>
      <li v-for="(item,index) in 4" :key="index" :ref="setRef">
          {{ index }} == {{ item }}
      </li>
    </ul>
</template>
<!-- // setup作为script的属性 是 setup函数的语法糖 -->
<script setup>
 const  setRef = (el)=>{
    console.log(el);
  }


</script>
<script>
export default {
  name: 'App',
}
</script>
